foo(int len, char *p)
{
    int i, sum = 0;
    for (i = 0; i < len; i++)
    {
        sum += p[i];
    }
}